import Vue from 'vue'
import Router from 'vue-router'
import Home from 'views/home/Index'
import Category from 'views/category/Index'
import Cart from 'views/cart/Index'
import User from 'views/user/Index'
import Detail from 'views/detail/Index'

Vue.use(Router)
const routes = [
  {
    path: '',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/category',
    component: Category
  },
  {
    path: '/cart',
    component: Cart
  },
  {
    path: '/user',
    component: User
  },
  {
    path: '/detail/:iid',
    component: Detail
  },
 
]
const router = new Router({
  routes,
  mode:'history'
})
export default router
